﻿<UserControl x:Class="Studio77.GuessTheWordsForWP7.Views.VisualKeyBoardItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    d:DesignHeight="480" d:DesignWidth="480" Width="60" Height="50">
	<UserControl.Resources>
		<Style x:Key="ButtonStyleVisualKey" TargetType="Button">
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="Button">
						<Grid>
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Disabled"/>
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver"/>
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Visibility)" Storyboard.TargetName="image">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<Image Source="/Studio77.GuessTheWordsForWP7;component/Images/word_button_normal.png" Stretch="Fill"/>
							<Image x:Name="image" HorizontalAlignment="Right" Source="/Studio77.GuessTheWordsForWP7;component/Images/word_button_pressed.png" Stretch="Fill" Width="60" Visibility="Collapsed"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</UserControl.Resources>
    
    <Grid x:Name="LayoutRoot">
    	<Button Content="" Style="{StaticResource ButtonStyleVisualKey}" Foreground="Black" FontSize="32" Click="Button_Click" />
    	<TextBlock x:Name="txtContent" HorizontalAlignment="Center" TextWrapping="Wrap" VerticalAlignment="Center" FontSize="29.333" Foreground="Black" FontFamily="Arial Black" IsHitTestVisible="False"/>
    </Grid>
</UserControl>
